<!DOCTYPE html>
<html>
    <head>
        <style>
            .offscreen_filter_area {
                -webkit-filter: grayscale(1);
                position: absolute;
                left: -3000px;
                width: 2048px;
                height: 2048px;
                background-color: blue;
            }
        </style>
    </head>
    <body>
        <p>This test passes if memory usage is not so hight that it crashes the browser. It should be less than 100MB.</p>
        <script>
            function createLayer() {
                var el = document.createElement("div");
                el.className = "offscreen_filter_area";
                return el;
            }

            if (window.testRunner)
                window.testRunner.dumpAsText();
            for (var i = 0; i < 2000; ++i)
                document.body.appendChild(createLayer());
        </script>
    </body>
</html>
